#ifndef _FNT_IMAGE_READER_H_
#define _FNT_IMAGE_READER_H_

#include <vector>
#include <string>
#include "image.h"

class ImageReader {
	protected:
	public:
		virtual ~ImageReader() { }
		virtual bool close() = 0;
		virtual bool getType(CubeType* type) =0;
		virtual bool getSizes(int64_t* w, int64_t* h, int64_t* d) =0;
		virtual bool readData(char* ptr, int32_t x0, int32_t y0, int32_t z0, int64_t ystride, int64_t zstride) =0;
		static ImageReader* create(const std::string& fn, const std::vector<char*>* bufs, size_t size);
		static ImageReader* create(const std::string& fn);
		//bool close();
};

#endif
